	function check_submit(form_obj){
		var r = true;
	    for (var i = 0; i < form_obj.elements.length; i++) {
	    	var field_obj = form_obj.elements[i];
	    	if(field_obj.getAttribute("restrict") != null){
	    		r = check_required(field_obj);
	    		if(!r)
	    			return false;
	    	}
	    }
	    
		if(!r){
			alert("表单填写不完整，不能提交！");
	   		return false;
	  	}else{
	  		return true;
	 	}
	};
	
	function check_required(field_obj){
		var value = field_obj.value;
		var restrict_list = field_obj.getAttribute("restrict");
		var r_v = 0;
		if(restrict_list != null){
			var r_arr = restrict_list.split(" ");
			for(var i = 0; i < r_arr.length; i++){
				var limit_str = r_arr[i];
				if(limit_str == 'int'){
					if(!check_number(value))
						r_v = 1;
				}else if(limit_str == 'email'){
					if(!check_email(value))
						r_v = 1;
				}else if(limit_str == 'date'){
					if(!check_date(value))
						r_v = 1;
				}else if(limit_str == 'time'){
					if(!check_time(value))
						r_v = 1;
				}else if(limit_str == 'double'){
					if(!check_double(value))
						r_v = 1;
				}else if(limit_str == 'url'){
					if(!check_url(value))
						r_v = 1;
				}else if(limit_str == 'ip'){
					if(!check_ip(value))
						r_v = 1;
				}
			}
		}
		
		if(r_v == 1)
			return false;
		
		if(value == ''){
			alert("所填不能为空！");
	   		return false;
	  	}else{
	  		return true;
	 	}
	};
	
	function check_number(value){
		var reg = "^[0-9]*$";
		var reg_obj = new RegExp(reg);
		if(value.match(reg_obj)){
	   		return true;
	  	}else{
	  		alert("所填必须为有效的数字！");
	   		return false;
	 	}
	};
	
	function check_double(value){
		var reg = "^[-\+]?\d+(\.\d+)?$";
		var reg_obj = new RegExp(reg);
		if(value.match(reg_obj)){
	   		return true;
	  	}else{
	  		alert("所填必须为有效的数字！");
	   		return false;
	 	}
	};
	
	function check_ip(value){
		var reg = "^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$";
		var reg_obj = new RegExp(reg);
		if(value.match(reg_obj)){
	   		return true;
	  	}else{
	  		alert("所填必须为有效的IP地址！");
	   		return false;
	 	}
	};
	
	function check_url(value){
		var reg = "^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$";
		var reg_obj = new RegExp(reg);
		if(value.match(reg_obj)){
	   		return true;
	  	}else{
	  		alert("所填必须为有效的URL地址！");
	   		return false;
	 	}
	};
	
	
	function check_email(value){
		var reg = "^[a-zA-Z0-9_-]+(\.([a-zA-Z0-9_-])+)*@[a-zA-Z0-9_-]+[.][a-zA-Z0-9_-]+([.][a-zA-Z0-9_-]+)*$";
		var reg_obj = new RegExp(reg);
		if(value.match(reg_obj)){
	   		return true;
	  	}else{
	  		alert("所填必须为有效的email地址！");
	   		return false;
	 	}
	};
	
	function check_date(value){
		var reg = "^((\\d{4})|(\\d{2}))([-./])(\\d{1,2})\\4(\\d{1,2})$";
		var reg_obj = new RegExp(reg);
		if(value.match(reg_obj)){
	   		return true;
	  	}else{
	  		alert("所填必须为有效的日期格式！");
	   		return false;
	 	}
	};
	
	function check_time(field_obj){
		var reg = "^[a-zA-Z0-9_-]+(\.([a-zA-Z0-9_-])+)*@[a-zA-Z0-9_-]+[.][a-zA-Z0-9_-]+([.][a-zA-Z0-9_-]+)*$";
		var reg_obj = new RegExp(reg);
		if(value.match(reg_obj)){
	   		return true;
	  	}else{
	  		alert("所填必须为有效的时间格式！");
	   		return false;
	 	}
	};
	
	function check_str_len(field_obj, len){
		var value = field_obj.value;
		if(value.length < len){
			alert("最少长度必须为"+len+"！");
	   		return false;
		}else{
			return true;
		}
	};
	
	function on_submit() {
		for (var i = 0; i < arguments.length; i++) {
			if(document.getElementById(arguments[i]).value == "") {
				alert(document.getElementById(arguments[i]).title + "不能为空！");
				return false;
			}
		}
		return true;
	};